package com.learn.designPatterns.createType.simpleFactory;

/**
 * @classname:
 * @Description:
 * @author: yfpu
 * @Date: 2018-08-27 10:13
 */
public class SimpleFactory {

    public Product createProduct(int type) {

        if (type == 1)
            return new concreteProduct1();
        else if (type == 2)
            return new concreteProduct2();

        return new concreteProduct();
    }
}
